<template>
    <taskAttribute @changeEventHandler="changeEventHandler" v-if="attribute.type==flowSetting.flowCellType.任务节点.type" :attribute="attribute" :key="new Date().getTime()"></taskAttribute>
    <edgeAttribute @changeEventHandler="changeEventHandler" v-else-if="attribute.type==flowSetting.flowCellType.边.type" :attribute="attribute" :key="new Date().getTime()"></edgeAttribute>
    <endAttribute @changeEventHandler="changeEventHandler" v-else-if="attribute.type==flowSetting.flowCellType.结束节点.type" :attribute="attribute" :key="new Date().getTime()"></endAttribute>
    <startAttribute @changeEventHandler="changeEventHandler" v-else-if="attribute.type==flowSetting.flowCellType.开始节点.type" :attribute="attribute" :key="new Date().getTime()"></startAttribute>

</template>
<script>
import pageSetting from '@/components/lt/codeGenerator/pageSetting'
import taskAttribute from './taskAttribute'
import edgeAttribute from './edgeAttribute'
import endAttribute from './endAttribute'
import startAttribute from './startAttribute'
import flowSetting from './flowSetting'

export default {
    name:'Attribute',
    components:{taskAttribute,edgeAttribute,endAttribute,startAttribute},
    props:{
        attribute:{
            type:Object,
            efault:()=>{}
        }
    },
    data(){
        return{
            flowSetting,
            pageSetting
        }
    },
   
    created(){
        // console.log(this.attribute)
    },
    methods:{
        changeEventHandler(item){
            this.$emit("changeEventHandler",item)
        }
    }
}
</script>